package com.miniot.base.config;
 

import cn.hutool.core.util.StrUtil;
import com.miniot.business.base.R;
import com.miniot.business.common.handler.DefaultGlobalExceptionHandler;
import com.miniot.business.exception.code.ExceptionCode;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;


/**
 * @author mikelei
 * @since 2022-12-20 18:33:46
 * v1.0.12 生成
 */
@Configuration
@ControllerAdvice(annotations = {RestController.class, Controller.class})
@ResponseBody
public class MiniotServiceExceptionConfiguration extends DefaultGlobalExceptionHandler {

//
@ExceptionHandler({AccessDeniedException.class})
public void httpMessageNotReadableException(AccessDeniedException ex) {
    throw ex;
}


}

